<%@ page language="java" pageEncoding="ISO-8859-1"%>

<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"
	prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"
	prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic"
	prefix="logic"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
	prefix="tiles"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-template"
	prefix="template"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-nested"
	prefix="nested"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html locale="true">
<head>
	<html:base />

	<title>updatepassword.jsp</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript">
  
  function checkblank(f)
{
   a=f.uid.value
   b=f.hn.value
   c=f.ya.value
  
  if((a.length==0) || (b.match("select")) || (c.length==0))
  {
    if(a.length==0)
      {
         document.getElementById("luid").innerHTML="<font color=red>Enter User id</font>"
      }
      if(b.match("select"))
      {
         document.getElementById("lhn").innerText="select 1 option"
      }
      if(c.length==0)
      {
         document.getElementById("lya").innerText="enter user answer"
      }
    return false;
  }
  }
  
  </script>
	<link href="css/style1.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="pink">
	<div class="main-out">
		<div class="main">
			<div class="page">
				<div class="top">
					<div class="header">
						<div class="header-top">
							<%@include file="TopHead.jsp"%>
						</div>
						<div class="topmenu">
							<%@include file="TopMenu.jsp"%>
						</div>
						<div class="">
							<img src="images/d3.gif">
						</div>
					</div>
					<div class="content">
						<div class="content-left">
							<div class="row1">
								<div class="img">
									&nbsp;
								</div>
								<div class="welcome">
									<h1 class="title">
										Welcome to POlice Sewa
										<span></span>
									</h1>
									<p>

										<%
										Object ob = request.getAttribute("II");
										%>
										<html:form action="upa" onsubmit="return checkblank(this)">
											<div align="center">
												<table border="0" width="50%">
													<%
													if (ob != null) {
													%>
													<tr>
														<td>
															User ID
														</td>
														<td>
															<html:text property="uid" value=""></html:text>
														</td>
														<td>
															<label id="luid"></label>
														</td>
													</tr>
													<tr>
														<td>
															Hint Question
														</td>
														<td>
															<html:select property="hn">
																<html:option value="select">Select Your Question</html:option>
																<html:option value="Your first teachers name">Your first teachers name</html:option>
																<html:option value="Your fathers middle name">Your fathers middle name</html:option>
																<html:option value="Which city you born">Which city you born</html:option>
																<html:option value="Your school name">Your school name</html:option>
																<html:option value="Your best friend in school">Your best friend in school</html:option>
															</html:select>

														</td>
														<td>
															<label id="lhn"></label>
														</td>
													</tr>
													<tr>
														<td>
															Your Answer
														</td>
														<td>
															<html:text property="ya" value=""></html:text>
														</td>
														<td>
															<label id="lya"></label>
														</td>
													</tr>
													<tr>
														<td colspan="2" align="center">
															<html:submit value="updatepassword" property="updp"></html:submit>
														</td>

													</tr>

													<tr>
														<td>
															<font color="red"><%=ob.toString()%></font>
														</td>
													</tr>

													<%
													} else {
													%>
													<tr>
														<td>
															User ID
														</td>
														<td>
															<html:text property="uid"></html:text>
														</td>
														<td>
															<label id="luid"></label>
														</td>
													</tr>
													<tr>
														<td>
															Hint Question
														</td>
														<td>
															<html:select property="hn">
																<html:option value="select">Select Your Question</html:option>
																<html:option value="Your first teachers name">Your first teachers name</html:option>
																<html:option value="Your fathers middle name">Your fathers middle name</html:option>
																<html:option value="Which city you born">Which city you born</html:option>
																<html:option value="Your school name">Your school name</html:option>
																<html:option value="Your best friend in school">Your best friend in school</html:option>
															</html:select>

														</td>
														<td>
															<label id="lhn"></label>
														</td>
													</tr>
													<tr>
														<td>
															Your Answer
														</td>
														<td>
															<html:text property="ya"></html:text>
														</td>
														<td>
															<label id="lya"></label>
														</td>
													</tr>
													<tr>
														<td colspan="2" align="center">
															<html:submit value="updatepassword" property="updp"></html:submit>
														</td>

													</tr>
												</table>
												<%
												}
												%>

											</div>
										</html:form>


									</p>
								</div>
							</div>

						</div>
						<div class="content-right">
							<%@include file="SideMenu.jsp"%>
							<p>
								&nbsp;
							</p>
							<p>
								&nbsp;
							</p>
							<p>
								&nbsp;
							</p>
						</div>
					</div>
				</div>
				<div class="bottom">
					<!--DO NOT Remove The Footer Links-->
					<p><%@include file="Footer.jsp"%><br>
						<!--DO NOT Remove The Footer Links-->
					</p>
				</div>
			</div>
		</div>
	</div>
</body>
</html:html>
